#
# Be sure to run `pod lib lint LanBKit.podspec' to ensure this is a
# valid spec before submitting.
#
# Any lines starting with a # are optional, but their use is encouraged
# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html
#

Pod::Spec.new do |spec|
  spec.name             = 'LanBKit'
  spec.version          = '1.0.0'
  spec.summary          = 'Lan Bright Kit'
  spec.homepage         = 'https://gitee.com/vic_wei/LanBKit.git'
  spec.license          = { :type => 'MIT', :file => 'LICENSE' }
  spec.author           = { 'v' => 'lanbkit@cc.cn' }
  spec.source           = { :git => 'git@gitee.com:vic_wei/LanBKit.git', :tag => spec.version.to_s }
  spec.ios.deployment_target = '9.0'
  spec.public_header_files = 'LanBKit/Classes/Core/LanBCore.h'
  spec.frameworks = 'UIKit', 'Foundation'
  spec.pod_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }
  spec.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }

    # core 层
    spec.subspec 'Core' do |coreSpec|
       coreSpec.source_files = 'LanBKit/Classes/Core/*.{h,m}'
       ######   basic   ######
       coreSpec.dependency 'ReactiveObjC'            , '3.1.1'
       coreSpec.dependency 'Masonry'                 , '1.1.0'
       coreSpec.dependency 'AFNetworking'            , '4.0.1'
       coreSpec.dependency 'MJExtension'             , '3.2.1'
#       ######   ui   ######
#       coreSpec.dependency 'FDFullscreenPopGesture'  , '~> 1.1'
#       coreSpec.dependency 'TZImagePickerController' , '~> 3.3.2'
#       coreSpec.dependency 'MJRefresh'               , '~> 3.4.3'

       coreSpec.subspec 'Category' do |s|
           s.source_files = 'LanBKit/Classes/Core/Category/**/*'
       end
       coreSpec.subspec 'Define' do |s|
           s.source_files = 'LanBKit/Classes/Core/Define/**/*'
       end
       coreSpec.subspec 'Model' do |s|
           s.source_files = 'LanBKit/Classes/Core/Model/**/*'
       end
       coreSpec.subspec 'LanBNet' do |s|
           s.source_files = 'LanBKit/Classes/Core/LanBNet/**/*'
       end
       coreSpec.subspec 'Util' do |s|
           s.source_files = 'LanBKit/Classes/Core/Util/**/*'
       end
       coreSpec.subspec 'Vender' do |s|
           s.subspec 'Aspects' do |ss|
               ss.source_files = 'LanBKit/Classes/Core/Vender/Aspects/**/*'
           end
           s.subspec 'Encryptions' do |ss|
               ss.source_files = 'LanBKit/Classes/Core/Vender/Encryptions/**/*'
           end
           s.subspec 'SSKeychain' do |ss|
               ss.source_files = 'LanBKit/Classes/Core/Vender/SSKeychain/**/*'
           end
           s.subspec 'WebViewJavascriptBridge' do |ss|
               ss.source_files = 'LanBKit/Classes/Core/Vender/WebViewJavascriptBridge/**/*'
           end
       end
    end
    
    # plugin 层
    spec.subspec 'Plugin' do |pluginSpec|
       pluginSpec.source_files = 'LanBKit/Classes/Plugin/*.{h,m}'
       
       # 支付plugin
       pluginSpec.subspec 'Deposit' do |s|
           s.source_files = 'LanBKit/Classes/Plugin/Deposit/**/*'
           s.dependency 'LanBKit/Core'
       end
       
       # socket.io plugin
       pluginSpec.subspec 'LanBSio' do |s|
           s.source_files = 'LanBKit/Classes/Plugin/LanBSio/**/*'
           s.vendored_libraries = 'LanBKit/Classes/Plugin/LanBSio/SocketIO-Client-CPP/libUniversalRelease.a'
           s.public_header_files = 'LanBKit/Classes/Plugin/LanBSio/*.h'
           s.preserve_paths = 'LanBKit/Classes/Plugin/LanBSio/SocketIO-Client-CPP/Headers/*.h'
#           s.vendored_frameworks = 'LanBKit/Classes/Plugin/LanBsio/Frameworks/xx.framework'
       end
       
       # CrashReport plugin
       pluginSpec.subspec 'CrashReport' do |s|
           s.source_files = 'LanBKit/Classes/Plugin/CrashReport/*.{h,m}'
           s.dependency 'KSCrash', '~> 1.15.21'
           s.subspec 'skpsmtpmessage' do |ss| # 邮箱smtp服务上包
               ss.source_files = 'LanBKit/Classes/Plugin/CrashReport/skpsmtpmessage/**/*'
               ss.public_header_files = 'LanBKit/Classes/Plugin/CrashReport/skpsmtpmessage/*.h'
               ss.frameworks = 'CFNetwork'
               ss.requires_arc = false
           end
       end

    end
   
end

# use eg:
# pod 'LanBKit', :git => 'http://front.lobochat.team:9001/community/ios/lanb-kit.git', :tag => "0.1.0"
